package com.learn.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author wangxing
 * @version 2020/7/22 9:10 Administrator
 */
@Controller
public class HelloController {
    @RequestMapping("/hello")
    public String hello(String name){
        System.out.println("hello springmvc:"+name);
//        return "redirect:index.jsp";
        return "index.jsp";
    }
    @RequestMapping("temp")
    @ResponseBody
    public String temp(String temp){
        return " temp :"+temp;
    }
}
